/*
 * ConsoleDumper.java   2008/08/19
 *
 * Copyright 2008 Web & Zen Multimedia, All rights reserved.
 * Use is subject to license terms.
 */
package it.wzm.lightweightlog;

import java.util.Properties;

/**
 * This Dumper serves as facility for writing entry to System log, any Dumper logging to System.out or System.err should extend this class.
 */
abstract class ConsoleDumper extends Dumper {
    
    /**
	 * As requested by serialization
	 */
	private static final long serialVersionUID = -6630786922506091938L;

	/**
     * Initialize Dumper with a custom made set of properties
     * @param p Properties
     */
    public ConsoleDumper(Properties p) {
        super(p);
    }    
    
    /**
     * This has no effect because the System.out is always open
     */
    @Override
    protected void close() {
    }
    
    /**
     * This has no effect because the System is always open
     */
    @Override
    protected void open() {
    }
    
    /**
     * Extending Dumper are asked to implement this method
     * @param e Anything extending Entry
     */
    @Override
    protected abstract <E extends Entry> void write(E e);
    
}
